home *** CD-ROM | disk | FTP | other *** search
- Path: newsfeed.direct.ca!usenet
- From: etoivane@direct.ca (Ed Toivanen)
- Newsgroups: comp.lang.c
- Subject: Re: 6 byte real to double; How?
- Date: 21 Feb 1996 23:01:30 GMT
- Organization: Your Organization
- Message-ID: <4gg88a$3oi@aphex.direct.ca>
- References: <3128306A.21F@hsc.unt.edu>
- NNTP-Posting-Host: 204.174.243.186
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.6
-
- In article <3128306A.21F@hsc.unt.edu>, sfogoros@hsc.unt.edu says...
- >
- >I have a lot of data files that were created by a pascal program. The
- >data is stored as 'file of real' meaning that each floating point value
- >is stored in six bytes. I need to access this data from a c program
- >(borland). I would like any assistance you could provide. I guess what
- >I need is a canned function that would take a 6 byte string (actually the
- >real), and return a double.
-
- You need to know exactly how reals are interpreted by your pascal program. The
- exact handling of a float is different(X bytes on the left side of the decimal,
- Y bytes for precision) even across different C compilers, so I don't think
- pascal would be much different in that respect. Once you know that, the rest is
- a few C line away.
-
- Ed
-
-